/**
 * 配置ExtJS组件
 */
Ext.BLANK_IMAGE_URL = "/ext/resources/images/default/s.gif";

Ext.QuickTips.init()
Ext.apply(Ext.QuickTips.getQuickTip(), {
    showDelay : 250,
    hideDelay : 300,
    dismissDelay : 0
}); // don't automatically hide quicktip

Ext.form.Field.prototype.msgTarget = 'under'

Ext.Ajax.defaultHeaders = {
    'accept' : 'application/json'
};
Ext.lib.Ajax.defaultPostHeader = 'application/json';

Ext.Msg.minWidth = 200;

//Thanks: http://extjs.com/forum/showthread.php?p=167921
Ext.TabPanel.prototype.layoutOnTabChange = true; 

//Thanks: http://extjs.com/forum/showthread.php?t=8051
Ext.Ajax.timeout=150000 //150秒

/*
 * 一些关于表格的格式化
 */
Ext.util.Format.RMB = function(value) {
	return value + '元';
};

Ext.util.Format.DISCOUNT = function(value) {
	if (value == '1') {
		return '不打折'
	} else {
		return (Number(value) * 10) + '折';
	}
};